const BaseURL = 'http://10.7.162.150:8089'
// const BaseURL = 'https://api.yuguoxy.com'
// const BaseURL = 'http://localhost:8089'
/**
 * obj = {url,method,data}
 * @param {*} obj 
 */
export const $request = (obj)=>{
    return new Promise((resolve,reject)=>{
        uni.request({
            url: BaseURL+obj.url,
            method:obj.method,
            data:obj.data,
            success:function(res){
                resolve(res.data)
            },
            fail:function(error){
                reject(error)
            }
          })
    })
}
